package com.dragon.modules.yuegou.query.order;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.order.OrderJingdongSkuEntity;
import com.dragon.modules.yuegou.enums.order.OrderJingdongSkuStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 京东订单商品信息 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2022-03-28 17:50:01
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class OrderJingdongSkuQuery extends OrderJingdongSkuEntity implements Query<OrderJingdongSkuEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 京东订单号查询条件 */
	@JsonUnwrapped(prefix = "jdOrderNo")
	private Condition<Long> jdOrderNoCondition;

    /** 商品编号查询条件 */
	@JsonUnwrapped(prefix = "skuId")
	private Condition<String> skuIdCondition;

    /** 商品名称查询条件 */
	@JsonUnwrapped(prefix = "name")
	private Condition<String> nameCondition;

    /** 商品数量查询条件 */
	@JsonUnwrapped(prefix = "num")
	private Condition<Integer> numCondition;

    /** 商品价格查询条件 */
	@JsonUnwrapped(prefix = "price")
	private Condition<BigDecimal> priceCondition;

    /** 实付价格查询条件 */
	@JsonUnwrapped(prefix = "bp")
	private Condition<BigDecimal> bpCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 修改时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** [枚举]退款状态：0-未退款-NO_REFUND、1-已退款-REFUND、2-退款失败-REFUND_FAIL查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<OrderJingdongSkuStatus> statusCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public OrderJingdongSkuQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public OrderJingdongSkuQuery(OrderJingdongSkuEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public OrderJingdongSkuQuery(OrderJingdongSkuQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.jdOrderNoCondition != null) {
			this.jdOrderNoCondition = other.jdOrderNoCondition.copy();
		}
		if(other.skuIdCondition != null) {
			this.skuIdCondition = other.skuIdCondition.copy();
		}
		if(other.nameCondition != null) {
			this.nameCondition = other.nameCondition.copy();
		}
		if(other.numCondition != null) {
			this.numCondition = other.numCondition.copy();
		}
		if(other.priceCondition != null) {
			this.priceCondition = other.priceCondition.copy();
		}
		if(other.bpCondition != null) {
			this.bpCondition = other.bpCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
	}

	@Override
	public QueryWrapper<OrderJingdongSkuEntity> toQueryWrapper() {
		QueryWrapper<OrderJingdongSkuEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (jdOrderNoCondition != null) {
			jdOrderNoCondition.toWrapper(wrapper, COL_JD_ORDER_NO);
		}
		if (skuIdCondition != null) {
			skuIdCondition.toWrapper(wrapper, COL_SKU_ID);
		}
		if (nameCondition != null) {
			nameCondition.toWrapper(wrapper, COL_NAME);
		}
		if (numCondition != null) {
			numCondition.toWrapper(wrapper, COL_NUM);
		}
		if (priceCondition != null) {
			priceCondition.toWrapper(wrapper, COL_PRICE);
		}
		if (bpCondition != null) {
			bpCondition.toWrapper(wrapper, COL_BP);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回京东订单号查询条件
	 * 
	 * @return jdOrderNoCondition 京东订单号查询条件
	 */
	public Condition<Long> jdOrderNo() {
		this.jdOrderNoCondition = new Condition<>();
		return this.jdOrderNoCondition;
	}
	
	/**
	 * 获取京东订单号查询条件
	 * 
	 * @return jdOrderNoCondition 京东订单号查询条件
	 */
	public Condition<Long> getJdOrderNoCondition() {
		return jdOrderNoCondition;
	}

	/**
	 * 设置京东订单号查询条件
	 * 
	 * @param jdOrderNoCondition 京东订单号查询条件
	 */
	public void setJdOrderNoCondition(Condition<Long> jdOrderNoCondition) {
		this.jdOrderNoCondition = jdOrderNoCondition;
	}

	/**
	 * 构造并返回商品编号查询条件
	 * 
	 * @return skuIdCondition 商品编号查询条件
	 */
	public Condition<String> skuId() {
		this.skuIdCondition = new Condition<>();
		return this.skuIdCondition;
	}
	
	/**
	 * 获取商品编号查询条件
	 * 
	 * @return skuIdCondition 商品编号查询条件
	 */
	public Condition<String> getSkuIdCondition() {
		return skuIdCondition;
	}

	/**
	 * 设置商品编号查询条件
	 * 
	 * @param skuIdCondition 商品编号查询条件
	 */
	public void setSkuIdCondition(Condition<String> skuIdCondition) {
		this.skuIdCondition = skuIdCondition;
	}

	/**
	 * 构造并返回商品名称查询条件
	 * 
	 * @return nameCondition 商品名称查询条件
	 */
	public Condition<String> name() {
		this.nameCondition = new Condition<>();
		return this.nameCondition;
	}
	
	/**
	 * 获取商品名称查询条件
	 * 
	 * @return nameCondition 商品名称查询条件
	 */
	public Condition<String> getNameCondition() {
		return nameCondition;
	}

	/**
	 * 设置商品名称查询条件
	 * 
	 * @param nameCondition 商品名称查询条件
	 */
	public void setNameCondition(Condition<String> nameCondition) {
		this.nameCondition = nameCondition;
	}

	/**
	 * 构造并返回商品数量查询条件
	 * 
	 * @return numCondition 商品数量查询条件
	 */
	public Condition<Integer> num() {
		this.numCondition = new Condition<>();
		return this.numCondition;
	}
	
	/**
	 * 获取商品数量查询条件
	 * 
	 * @return numCondition 商品数量查询条件
	 */
	public Condition<Integer> getNumCondition() {
		return numCondition;
	}

	/**
	 * 设置商品数量查询条件
	 * 
	 * @param numCondition 商品数量查询条件
	 */
	public void setNumCondition(Condition<Integer> numCondition) {
		this.numCondition = numCondition;
	}

	/**
	 * 构造并返回商品价格查询条件
	 * 
	 * @return priceCondition 商品价格查询条件
	 */
	public Condition<BigDecimal> price() {
		this.priceCondition = new Condition<>();
		return this.priceCondition;
	}
	
	/**
	 * 获取商品价格查询条件
	 * 
	 * @return priceCondition 商品价格查询条件
	 */
	public Condition<BigDecimal> getPriceCondition() {
		return priceCondition;
	}

	/**
	 * 设置商品价格查询条件
	 * 
	 * @param priceCondition 商品价格查询条件
	 */
	public void setPriceCondition(Condition<BigDecimal> priceCondition) {
		this.priceCondition = priceCondition;
	}

	/**
	 * 构造并返回实付价格查询条件
	 * 
	 * @return bpCondition 实付价格查询条件
	 */
	public Condition<BigDecimal> bp() {
		this.bpCondition = new Condition<>();
		return this.bpCondition;
	}
	
	/**
	 * 获取实付价格查询条件
	 * 
	 * @return bpCondition 实付价格查询条件
	 */
	public Condition<BigDecimal> getBpCondition() {
		return bpCondition;
	}

	/**
	 * 设置实付价格查询条件
	 * 
	 * @param bpCondition 实付价格查询条件
	 */
	public void setBpCondition(Condition<BigDecimal> bpCondition) {
		this.bpCondition = bpCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置修改时间查询条件
	 * 
	 * @param modifiedTimeCondition 修改时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回[枚举]退款状态：0-未退款-NO_REFUND、1-已退款-REFUND、2-退款失败-REFUND_FAIL查询条件
	 * 
	 * @return statusCondition [枚举]退款状态：0-未退款-NO_REFUND、1-已退款-REFUND、2-退款失败-REFUND_FAIL查询条件
	 */
	public Condition<OrderJingdongSkuStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取[枚举]退款状态：0-未退款-NO_REFUND、1-已退款-REFUND、2-退款失败-REFUND_FAIL查询条件
	 * 
	 * @return statusCondition [枚举]退款状态：0-未退款-NO_REFUND、1-已退款-REFUND、2-退款失败-REFUND_FAIL查询条件
	 */
	public Condition<OrderJingdongSkuStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]退款状态：0-未退款-NO_REFUND、1-已退款-REFUND、2-退款失败-REFUND_FAIL查询条件
	 * 
	 * @param statusCondition [枚举]退款状态：0-未退款-NO_REFUND、1-已退款-REFUND、2-退款失败-REFUND_FAIL查询条件
	 */
	public void setStatusCondition(Condition<OrderJingdongSkuStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

}
